package com.ebupt.myapp.mvc;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.ebupt.myapp.service.CaiyinService;

/**
 * 
 * @author Johnny
 *
 */
@Controller
public class CaiyinController {

	private CaiyinService caiyinService;

	@RequestMapping("/caiyin/setting")
	public String cainyinSetting(
			Model model,
			@RequestParam(value = "phoneNumber", required = true) String phoneNumber,
			@RequestParam(value = "content", required = true) String content)
			throws Exception {
		caiyinService.modSetting(phoneNumber, content);
		model.addAttribute("setting", content);
		return "caiyin";
	}

	public CaiyinService getCaiyinService() {
		return caiyinService;
	}

	public void setCaiyinService(CaiyinService caiyinService) {
		this.caiyinService = caiyinService;
	}

}
